<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div id="container">

    <user-item
            v-for="user in users"
            v-bind:item="user"
    />
</div>

<script src="https://unpkg.com/vue@next"></script>
<script type="text/javascript">

    const demoApp = {
        data() {
            return {
                users: [
                    {'name': 'alice', 'age': 12},
                    {'name': 'bob', 'age': 13},
                    {'name': 'john', 'age': 14},
                ]
            }
        },
        mounted() {

        },
        methods: {}

    }

    const app = Vue.createApp(demoApp)

    app.component('user-item', {
        props: ['item'], //自定义控件的属性有哪些, 外部使用控件的时候，如何进行绑定。
        template: '<p>{{item.name}}, {{item.age}}</p>'
    })
    app.mount('#container')
</script>

</body>
</html>
